package cn.funnyxb.tools.appFrame.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DatetimeTool
{
  public static String change2Date(long paramLong)
  {
    return new SimpleDateFormat("yyyy-MM-dd").format(new Date(paramLong));
  }

  public static String change2DateTime(long paramLong)
  {
    return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(paramLong));
  }

  public static String getDelaysInCn(long paramLong)
  {
    long l1 = System.currentTimeMillis();
    long l2 = Math.abs(l1 - paramLong);
    if (l1 < paramLong);
    for (String str1 = "后"; ; str1 = "前")
    {
      long l3 = l2 / 1000L;
      if (l3 < 60L);
      int i;
      for (String str2 = (int)l3 + "秒" + str1; ; str2 = (i / 365) + "年" + str1)
        while (true)
        {
          return str2;
          if (l3 < 3600L)
            str2 = ((int)l3 / 60) + "分" + (int)(l3 % 60L) + "秒" + str1;
          if (l3 < 86400L)
            str2 = ((int)l3 / 3600) + "小时" + str1;
          i = (int)(l3 / 86400L);
          if (i < 30)
            str2 = i + "天" + str1;
          if (i >= 365)
            break;
          str2 = (i / 30) + "月" + str1;
        }
    }
  }

  public static int getInterDays(long paramLong1, long paramLong2)
  {
    return (int)(Math.abs(paramLong1 - paramLong2) / 86400000L);
  }

  public static int getTimeInHHMM(long paramLong)
  {
    Date localDate = new Date(paramLong);
    return (100 * localDate.getHours() + localDate.getMinutes());
  }

  public static boolean isSameDay(long paramLong1, long paramLong2)
  {
    Date localDate1 = new Date(paramLong1);
    Date localDate2 = new Date(paramLong2);
    if ((localDate1.getDate() != localDate2.getDate()) || (localDate1.getMonth() != localDate2.getMonth()) || (localDate1.getYear() != localDate2.getYear()));
    for (int i = 0; ; i = 1)
      return i;
  }

  public static boolean isToday(long paramLong)
  {
    return isSameDay(paramLong, System.currentTimeMillis());
  }
}

/* Location:           E:\Desktop\复件 classes_dex2jar.jar
 * Qualified Name:     cn.funnyxb.tools.appFrame.util.DatetimeTool
 * JD-Core Version:    0.5.3
 */